Avoid an X error
authorMatthias Clasen <mclasen@redhat.com>
Fri, 8 Jan 2016 18:48:10 +0000 (13:48 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 8 Jan 2016 18:50:46 +0000 (13:50 -0500)
We are getting the mime data destroy notify called when we
destroy the surface in finalize. Trying to set the XSync counters
at this time is a) pointless and b) yielding an X error because
the counters have already been destroyed.
To avoid this, unhook the damage tracking before destroying
the surface.

https://bugzilla.gnome.org/show_bug.cgi?id=760188

gdk/x11/gdkwindow-x11.c

index 6106b28d1830c81c50eadd7952968e1b08e0fe3d..ffe97767f051661480979ca214b989c7203092a2 100644 (file)
@@ -1331,6 +1331,8 @@ gdk_x11_window_destroy (GdkWindow *window,
   if (toplevel)
     gdk_toplevel_x11_free_contents (GDK_WINDOW_DISPLAY (window), toplevel);
 
+  unhook_surface_changed (window);
+
   if (impl->cairo_surface)
     {
       cairo_surface_finish (impl->cairo_surface);